package com.java.test.JVM.classLoader;

/**
 * @author TonyOne
 * @version 1.0
 * @desc
 * @date 2018/10/13 9:52
 * @company
 */
class StaticBlock {
    static final int c = 3;

    static final int d;

    static int e = 5;

    /**
     * JDK会自动为e的初始化创建一个static块
     * （参考：http://www.java3z.com/cwbwebhome/article/article8/81101.html?id=2497），所以上面的代码等价于：
     * static int e;
         static {
         e=5;
         }
     */
    static {
        d = 5;
        e = 10;
        System.out.println("Initializing");
    }

    StaticBlock() {
        System.out.println("Building");
    }
}
